//
//  JwScreen.h
//  JwPack
//
//  Created by 陈警卫 on 2024-07-26.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

/*
 (+: Plus, m: mini, P:Pro, PM: ProMax)
 
 iPhone 15+/15PM        430x932  1290x2796  @3x  6.7
 iPhone 15/15P          393x852  1179x2556  @3x  6.1
 iPhone 14PM            430x932  1290x2796  @3x  6.7
 iPhone 14P             393x852  1179x2556  @3x  6.1
 iPhone 14+             428x926  1284x2778  @3x  6.7
 iPhone 14              390x844  1170x2532  @3x  6.1
 iPhone 13PM            428*926  1284*2778  @3x  6.7
 iPhone 13/13P          390*844  1170*2532  @3x  6.1
 iPhone 13m             360*780  1080*2340  @3x  5.4
 iPhone 12PM            428*926  1284*2778  @3x  6.7
 iPhone 12m             375*812  1080*2340  @3x  5.4
 iPhone 12/12P          390*844  1170*2532  @3x  6.1
 iPhone XsM/11PM        414*896  1242*2688  @3x  6.5
 iPhone Xr/11           414*896  828*1792   @2x  6.1
 iPhone X/Xs/11P        375*812  1125*2436  @3x  5.8
 iPhone 6+/6S+/7+/8+    414*736  1242*2208  @3x  5.5
 iPhone 6/6S/7/8/SE2    375*667  750*1334   @2x  4.7
 iPhone 5/5S/5c/SE      320*568  640*1136   @2x  4.0
 iPhone 4/4s            320*480  640*960    @2x  3.5
 
 */

/// 屏幕的size
#define kJwScrSize [JwScreen size]
/// 屏幕的width
#define kJwScrWidth [JwScreen width]
/// 屏幕的height
#define kJwScrHeight [JwScreen height]

/// 布局比例基准 基于iPhoneX 比例
#define kJwScrBaseWidth [JwScreen baseSize].width

#define kJwScrBaseHeight [JwScreen baseSize].height

#define kJwScrScaleWidth [JwScreen scaleWidth]


/// 电池状态栏高度
#define kJwScrBatBarHeight [JwScreen batBarHeight]
/// 导航栏高度
#define kJwScrNavBarHeight [JwScreen navBarHeight]
/// 电池状态栏和导航栏高度
#define kJwScrNavBatBarHeight [JwScreen navBatBarHeight]


/// 底栏高度
#define kJwScrBottomHeight [JwScreen bottomBarHeight]
/// tab菜单栏高度
#define kJwScrTabBarHeight [JwScreen tabBarHeight]
/// 底栏和tab菜单栏高度
#define kJwScrTabBottomBarHeight [JwScreen tabBottomHeight]


@interface JwScreen : NSObject

+ (CGRect)bounds;

+ (CGSize)size;

+ (CGFloat)width;

+ (CGFloat)height;

/// 判断刘海屏
+ (BOOL)isScreenBangs;

/// 电池栏高度
+ (CGFloat)batBarHeight;

/// 导航栏高度
+ (CGFloat)navBarHeight;

+ (CGFloat)navBatBarHeight;

/// 下巴高度
+ (CGFloat)bottomBarHeight;

/// tab高度
+ (CGFloat)tabBarHeight;

+ (CGFloat)tabBottomHeight;

/// 基础尺寸
+ (CGSize)baseSize;

/// 基础宽度比例
+ (CGFloat)scaleWidth;

/// keyWindow
+ (UIWindow *)keyWindow;

/// normalWindow
+ (UIWindow *)normalWindow;

/// window
+ (UIWindow *)window;

/// 最前导航控制器
+ (UINavigationController *)frontNC;

/// 最前导航控制器
+ (UINavigationController *)frontNCFromVC:(UIViewController *)vc;

/// 最前控制器
+ (UIViewController *)frontVC;

/// 最前控制器
+ (UIViewController *)frontVCFromVC:(UIViewController *)vc;


@end

